<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <p>我叫{{ obj.name }},今年{{ obj.age }}岁了</p>
    </div>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <script>
        //从Vue中解构出 createApp,reactive
        const { createApp, reactive } = Vue

        createApp({
            setup() 
            {
                //创建一个响应式对象
                const obj = reactive({
                    name: '小bit',
                    age: 9
                })

                return {obj}
            }

        }).mount('#app')
    </script>
</body>

</html>